package com.ls.fw.hadoop.client.bean;

import java.io.Serializable;

import org.apache.hadoop.net.NetworkTopology;

public class Namenode implements Serializable {

	/**
	 * 序列化ID
	 */
	private static final long serialVersionUID = 1L;

	private boolean isDead = false;
	
	private long capacity;
	private long dfsUsed;
	private long remaining;
	private long blockPoolUsed;
	private String lastUpdate;
	private int xceiverCount;
	private String name = null;
	private String hostName = null;
	private String location = NetworkTopology.DEFAULT_RACK;

	public boolean isDead() {
		return isDead;
	}

	public void setDead(boolean isDead) {
		this.isDead = isDead;
	}

	public Namenode(String name, String hostName) {
		super();
		this.name = name;
		this.hostName = hostName;
	}

	public Namenode(boolean isDead, long capacity, long dfsUsed,
			long remaining, long blockPoolUsed, String lastUpdate,
			int xceiverCount, String name, String hostName, String location) {
		super();
		this.isDead = isDead;
		this.capacity = capacity;
		this.dfsUsed = dfsUsed;
		this.remaining = remaining;
		this.blockPoolUsed = blockPoolUsed;
		this.lastUpdate = lastUpdate;
		this.xceiverCount = xceiverCount;
		this.name = name;
		this.hostName = hostName;
		this.location = location;
	}

	public Namenode(boolean isDead,String name, long capacity, long dfsUsed,
			long remaining, long blockPoolUsed, String lastUpdate,
			int xceiverCount, String hostName, String location) {
		super();
		this.name = name;
		this.isDead = isDead;
		this.capacity = capacity;
		this.dfsUsed = dfsUsed;
		this.remaining = remaining;
		this.blockPoolUsed = blockPoolUsed;
		this.lastUpdate = lastUpdate;
		this.xceiverCount = xceiverCount;
		this.hostName = hostName;
		this.location = location;
	}
    public Namenode(){
    	super();
    }
	public long getCapacity() {
		return capacity;
	}

	public void setCapacity(long capacity) {
		this.capacity = capacity;
	}

	public long getDfsUsed() {
		return dfsUsed;
	}

	public void setDfsUsed(long dfsUsed) {
		this.dfsUsed = dfsUsed;
	}

	public long getRemaining() {
		return remaining;
	}

	public void setRemaining(long remaining) {
		this.remaining = remaining;
	}

	public long getBlockPoolUsed() {
		return blockPoolUsed;
	}

	public void setBlockPoolUsed(long blockPoolUsed) {
		this.blockPoolUsed = blockPoolUsed;
	}

	public String getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(String lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public int getXceiverCount() {
		return xceiverCount;
	}

	public void setXceiverCount(int xceiverCount) {
		this.xceiverCount = xceiverCount;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public String toString() {
		return "Namenode [blockPoolUsed=" + blockPoolUsed + ", capacity="
				+ capacity + ", dfsUsed=" + dfsUsed + ", hostName=" + hostName
				+ ", isDead=" + isDead + ", lastUpdate=" + lastUpdate
				+ ", location=" + location + ", name=" + name + ", remaining="
				+ remaining + ", xceiverCount=" + xceiverCount + "]";
	}

}
